package com.cpe.data.domain.appoint;

import java.util.Date;
import java.util.List;

import com.google.common.collect.Lists;
import com.sql.data.response.BaseInfo;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public class AppointInfo extends BaseInfo {
	private static final long serialVersionUID = 7940496593846636785L;

	private String title;

	private String brief;

	private Date startTime;

	// 已申请预约的孩子
	private List<AppointingChild> appointingChilds;

	// 已约定的孩子
	private List<AppointedChild> appointedChilds;

	// 是否有预约记录
	private Boolean hasAppointRecord;

	public AppointInfo() {
		this.appointingChilds = Lists.newArrayList();
		this.appointedChilds = Lists.newArrayList();
	}

	public Boolean getHasAppointRecord() {
		if (appointedChilds.size() > 0 || appointingChilds.size() > 0) {
			this.hasAppointRecord = true;
		} else {
			this.hasAppointRecord = false;
		}
		return this.hasAppointRecord;
	}
}
